home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 1 / Gold Medal Software Volume 1 (Gold Medal) (1994).iso / graphics / fred.arj / FRED.TXT < prev    next >
Text File  |  1993-08-12  |  14KB  |  224 lines

  1.           FRACTAL EDITOR : FrEd  (ver. 1.3)
  2.           (c)1993 by David Canright
  3.  
  4. QUICK START: (F5 key to expand/contract help window, arrows up&down, PgUp/Dn)
  5. In FrEd, each FRACTAL is made of two or more pieces, and each PIECE is a
  6. smaller (and maybe distorted) copy of the whole fractal.  The fractal RECIPE
  7. has a line of numbers for each piece that describes geometrically how to make
  8. the copy from the whole.  FrEd has two screens: the main screen to edit
  9. recipes, open files, etc., and the graphics screen to display a fractal (dot
  10. by dot).  To see a fractal, choose "Display" with the mouse or by Alt-D.
  11.  
  12.           HOW TO USE FrEd
  13.  
  14. GRAPHICS SCREEN COMMANDS: (type capital letter)
  15. Random: generate a new fractal recipe from random numbers
  16. View all: adjust the screen view to fit the whole fractal
  17. Proportional: adjust screen view for correct x-y proportions
  18. Save image: save screen image to PCX file (specify filename, will add .PCX)
  19. restArt: clear the screen and start the dots again (this isn't on menu)
  20. type any OTHER key to return to the main screen
  21.  
  22. EDITING FRACTAL RECIPES: (F6 to switch windows)
  23. Use the mouse (double-click) or Tab key to select a number (Shift-Tab to move
  24. back), then type a new number (also see Edit commands below).  To check or
  25. uncheck a "flip" box, use the space bar or mouse.  Note: IN A RECIPE, ALL
  26. NUMBERS MUST BE BETWEEN 0.0 AND 1.0 (except xoff and yoff, which can be
  27. anything).  You may enter any digits, and the decimal point will be adjusted
  28. automatically (except xoff & yoff), so if you enter 5 you get 0.5 (but to get
  29. 0.1 or less you must include the decimal point). Negative numbers will be
  30. modified appropriately (see below).  All angles ("angle", "rotatn") are in
  31. fractions of a full circle (so 0.25 is 90 degrees).  The View boundaries may
  32. be any numbers; by default both x & y range from 0 to 1.
  33.  
  34. MAIN SCREEN COMMANDS: (To access submenus, hit F10 and use arrow keys, or Alt
  35. key with highlighted letter, then type highlighted letter of command.  Most
  36. commands are also directly accessible from the keyboard by Alt or Function
  37. keys (see below).  To leave a menu or cancel a command, hit Esc key.)
  38.      FILE submenu (Alt-F):
  39. Open (Alt-O): open a recipe file (.IFS extension) in new window
  40. New (Alt-N): open a new window with the default recipe (double dragon)
  41. Save (Alt-S): save current recipe to a file (.IFS extension)
  42. Change dir: change to another directory (for .IFS files; don't close help)
  43. Set BGI path: tell FrEd what directory has .BGI files (graphics drivers)
  44. Exit (Alt-X): bye-bye FrEd, back to DOS
  45.      FRACTAL submenu (Alt-A):
  46. Display (Alt-D): show current fractal on graphics screen
  47. Set View (Alt-V): adjust view limits, either: 
  48.   to show fractal in correct x-y proportions, or 
  49.   to fit view to whole fractal (after displaying)
  50. # of Pieces (Alt-P): change number of pieces in recipe (up to 12)
  51. Design Piece (Alt-G): redefine numbers for current piece by where three points
  52.   from the whole get copied to in the piece, or other info (see below)
  53. Calc Point (Alt-T): calculate where a point from the whole gets copied to in
  54.   the current piece
  55. Random (Alt-R): generate random recipe
  56. Color pieces (Alt-C): switch between random color and color recipe
  57. Background B/W (Alt-B): switch between black and white background (EGA/VGA)
  58.      EDIT submenu (Alt-E):
  59. Copy Piece (F7): copy whole line of numbers, to clipboard
  60. Paste Piece (F8): replace whole line of numbers, from clipboard
  61. Clear Piece (F9): clear whole line of numbers to 0
  62. Copy Number (Shift-F7): copy number to clipboard
  63. Paste Number (Shift-F8): replace number from clipboard
  64. Clear Number (Shift-F9): clear number to 0
  65.      WINDOWS submenu (Alt-W):
  66. Move (Ctrl-F5): to move window using cursor arrows; hit Enter when done
  67. Next (F6): switch to next window
  68. Previous (Shift-F6): switch to previous window
  69. Close (Alt-F3): close current window
  70.      other commands: (on bottom line; mouse works there too)
  71. Help (F1): open (or bring forward) help window with this information
  72. Menu (F10): move cursor to menu, use cursor arrows to move in menu
  73.  
  74.           WHAT IS A FRACTAL?
  75.  
  76.      In traditional geometry, shapes were simple and smooth, like circles and
  77. triangles, and could be described with a few numbers.  But in nature, usually
  78. shapes are very complicated and rough, with lots of small details.  And often,
  79. the details look similar to the whole thing, as a twig resembles a branch,
  80. which resembles a tree.  So if you look closely at the details, you see
  81. details on the details, and even smaller details on the details on the
  82. details...
  83.      Benoit Mandelbrot invented the name "fractal" for such geometric shapes,
  84. which have theoretically infinite levels of detail.  (There is a mathematical
  85. way to redefine the idea of dimension so that fractals have fractional dimen-
  86. sion, so instead of a 1-D curve or a 2-D area it could be a 1.7-D fractal.) 
  87. This computer program shows pictures of one of the simplest types of fractals,
  88. for which the whole shape is made up of two or more main pieces, where each
  89. piece is a shrunken (scaled) and moved copy of the whole thing.  Thus each of
  90. the main pieces is made of smaller pieces, which are made of still smaller
  91. pieces... and so the shape has more and more details, the closer you look. 
  92. (On the computer screen the image is limited by the screen resolution.)  
  93.      The picture is formed dot by dot, where each step takes the previous dot
  94. and copies it from the whole fractal to the corresponding point in one of the
  95. main pieces (remember, each piece is a smaller copy of the whole).  Which
  96. piece to copy to is chosen at random each time.  (Michael Barnsley developed
  97. this method; he calls it the "Chaos Game," as mentioned in the book "Chaos" by
  98. James Gleick.  The detailed mathematics are given in "Fractals Everywhere," by
  99. Michael Barnsley.  The recipe is called an Iterated Function System, or IFS.) 
  100. At first, with only a few dots, the shape is indistinct, but the longer you
  101. wait, the clearer the details become.  
  102.  
  103.           WHAT DO THE NUMBERS MEAN?
  104.  
  105.      The six numbers for each piece tell how the whole shape should be trans-
  106. formed (shrunken, rotated, and moved) to make that piece.  The first three
  107. numbers tell how to shrink the copy: "scale1" and "scale2" give the relative
  108. shrinkage in two perpendicular directions, where "angle" gives the direction
  109. (as a fraction of 360 degrees) to which "scale1" applies.  For example, if
  110. scale1=0.5, scale2=0.3, and angle=0.125, a circle would be transformed to an
  111. ellipse, with the long axis along a 45 degree diagonal direction, half as long
  112. as the diameter of the circle, and the short axis (in the perpendicular
  113. direction) 30% as long as the diameter of the circle.  (This shows how, if
  114. scale1 and scale2 are different, the copy is distorted, and the angle shows in
  115. which direction it is distorted.  But if both scales are the same, there is no
  116. distortion and the angle doesn't matter.)  
  117.      If the "flip" box is checked, the copy is flipped over to give a mirror
  118. image.  (The direction given by "angle" is reversed, equivalent to making
  119. scale1 negative.  Making scale2 negative is similar, with a 0.5 rotation.)
  120.      The next number, "rotatn," tells how much to rotate the copy; for
  121. example, if rotatn=0.125, the ellipse above would be turned so that its long
  122. axis was vertical.  (Rotation tends to give spiral shapes in the fractals.)
  123.      The other two numbers tell how the copy should be positioned: "xf" and
  124. "yf" are the coordinates of the "focal point" (or "fixed point") of the
  125. transformation.  The focal point is the one point that does not get moved by
  126. the transformation; that is, the copy of the focal point is in the same place
  127. as the original.  So if the original circle above were centered at (0,0), and
  128. xf=0 and yf=0, the center of the transformed elipse would also be (0,0). 
  129.      The best way to understand all this is to start with a simple 2-piece
  130. recipe (like the default: the double-dragon fractal), and make each piece a
  131. different color (see below), then experiment.  Be sure to set the View to
  132. proper proportions so no extra distortion is introduced.  To keep things
  133. clear, don't let the pieces overlap; if they do, reduce the scales.  Notice
  134. that changing one number in one piece can change the whole fractal.  Beware
  135. that if all your pieces have the same focal point, the whole fractal is only
  136. that one point.
  137.  
  138. COLOR RECIPES:
  139.      When the color recipe option is chosen, there are two more numbers for
  140. each piece: "colscl" and "colorf", which are like the scale and focal point in
  141. the color dimension.  So when the whole is copied to the piece, the range of
  142. colors is shrunk by colscl, and the color range is shifted toward colorf.  If
  143. colscl is 0, the whole piece is the same color, given by colorf.  If colscl is
  144. large (like 0.9), then the colors in the piece will be similar to the corre-
  145. sponding colors in the whole.
  146.      Of course, the details of color are limited by the color resolution of
  147. the display (here, limited by the Borland BGI drivers).  For EGA and VGA
  148. graphics, 15 colors are available, arranged somewhat like a rainbow, corre-
  149. sponding to the range of numbers from 0 to 1.  (The full spectrum is shown in
  150. the Sierpinski triangle: TRIANGLE.IFS)  The divisions between colors occur at
  151. 0.0667, 0.1333, 0.2000, etc. (multiples of 1/15).
  152.  
  153. FRACTAL DESIGN:
  154.      After some experience with FrEd, you may want to design a fractal with a
  155. particular shape.  The trick is to figure out how to make that shape from
  156. smaller copies of itself.  Try a very rough sketch on graph paper, then sketch
  157. a few smaller, squashed copies on top (maybe overlapping each other) so that
  158. the combined outline of the pieces approximates the shape you want.  Now pick
  159. three representative points in the whole shape (not all in a line), and get
  160. their coordinates from the graph paper.  For each smaller copy, estimate where
  161. those three points get copied to.  Then you're ready for FrEd: (1) open a new
  162. fractal window (2) set the # of pieces (3) for each piece, select that line of
  163. the recipe (by selecting a number) (4) use the "Design Piece" command (from
  164. the Fractal menu): don't check the Undistorted Copy box or the Know Focal
  165. Point box; it will ask for a point in the whole and where it gets copied to
  166. (which you already wrote down) three times; after the third point all the
  167. numbers for that piece will be set (5) do steps 3-4 for all the other pieces.
  168.      Instead of describing how three points get copied, you could base the
  169. design on other information.  For example, if you know you want a piece to be
  170. an undistorted smaller copy of the whole, check the Undistorted Copy box. It
  171. will ask if you also know the scale (and if you want a flipped copy, check
  172. that box).  If you do know the scale it will only need one point; if not it
  173. will need two.  Also, if you know the focal point, check that box initially
  174. (and that counts as one of the points).
  175.      For example, suppose you draw a right triangle with the corners on the
  176. points (0,0) (point A), (1,0) (B) and (0,1) (C) (draw a picture).  And you
  177. realize that you can divide it in half into two smaller triangles, with a line
  178. from (0,0) to (0.5,0.5) (point D) (now open a new fractal window).  For the
  179. lower triangle, you could choose to make the copy so that C from the whole
  180. goes to B in the copy, and B goes to A, and A goes to D (go ahead and put that
  181. information in).  Then for the upper triangle, for variety, you could describe
  182. it as an undistorted copy that is flipped with C as a focal point, and again B
  183. from the whole goes to A in the copy (put that information in for the other
  184. line).  Then display it; a proportional view should give the triangle. 
  185. (Change one color scale to 0.8 to see the copies of copies; then the other. 
  186. The lower copies spiral in but the upper copies zigzag toward the corner.) 
  187. For more practice you might try designing your first initial as a fractal.
  188.      Another tool you may find helpful is the "Calc Point" command. Pick a
  189. piece, and try the command: it will ask for a point from the whole (by default
  190. the last point it calculated), and calculate where the copy of that point is.
  191.  
  192.           PRINTING IMAGES:
  193.  
  194. Be sure to run the DOS "GRAPHICS" command with appropriate arguments for your
  195. printer, BEFORE running FrEd.  Then the PrintScreen key should work.  
  196.      To save an image to file, use the "Save image" command from the graphics
  197. screen (type "S", then give filename, no extension needed).  This will save
  198. the whole screen (except the bottom text line) in a ZSoft Paintbrush format
  199. file (.PCX extension).  Then the image can be used in other programs, such as
  200. paint programs or page layout applications.
  201.  
  202.           IMPORTANT NOTICE:
  203.  
  204. FrEd was designed and developed by David Canright, using Borland C++ with the
  205. TurboVision library of objects.
  206.  
  207. This software is distributed as FREEWARE, with no warrantees of any kind.  The
  208. author retains all copyrights.  You are licensed (and encouraged) to use the
  209. program as much as you want and to give copies to other people, provided the
  210. copies you distribute are IDENTICAL to the original, including ALL accessory
  211. files (preferably as the compressed package FREDEX.EXE and also READ.ME), and
  212. provided you charge no fees for the program.  
  213.  
  214. I would very much appreciate receiving a postcard with your comments, along
  215. with any cool recipes.
  216.  
  217.      David Canright
  218.      830 Altura Place
  219.      Del Rey Oaks, CA  93940
  220.  
  221.      (Compu-Serve: 71055,1403)
  222.  
  223.           HAVE FUN!
  224.